package com.nightsoul.spring.cloud.test.spring.boot.helloworld;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class HelloWorldController {
	
	@Value("${mysqldb.datasource.username}")
	String username;
	
	@ResponseBody
    @RequestMapping(value = "/hello")
    public String hello() {
        return "Hello " + username;
    }
	
	public static void main(String[] args) {
		SpringApplication.run(HelloWorldController.class, args);
	}
}
